mirror of
https://github.com/kou029w/intro-to-software-testing.git
synced 2025-01-18 16:08:00 +00:00
use actions/deploy-pages
This commit is contained in:
parent
396a0aa8b6
commit
4dc3034d51
1 changed files with 8 additions and 11 deletions
19
.github/workflows/github-pages.yml
vendored
19
.github/workflows/github-pages.yml
vendored
|
@ -4,23 +4,20 @@ on:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
jobs:
|
jobs:
|
||||||
main:
|
main:
|
||||||
|
permissions:
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
environment: github-pages
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with: { node-version: lts/*, cache: yarn }
|
with: { node-version: lts/*, cache: yarn }
|
||||||
- name: Git config
|
|
||||||
run: |
|
|
||||||
git config user.name bot
|
|
||||||
git config user.email bot@example
|
|
||||||
git subtree add --prefix pages origin gh-pages
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
yarn install
|
yarn install
|
||||||
yarn build
|
yarn build
|
||||||
- name: Publish
|
- uses: actions/upload-pages-artifact@v1
|
||||||
run: |
|
with:
|
||||||
git add -f pages
|
path: pages
|
||||||
if git commit -m update; then
|
- uses: actions/deploy-pages@v1
|
||||||
git subtree push --prefix pages origin gh-pages
|
|
||||||
fi
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue