Skip to content

Commit

Permalink
Update pages.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
liuduwei authored Nov 17, 2023
1 parent 3285a5b commit 2a342ca
Showing 1 changed file with 26 additions and 11 deletions.
37 changes: 26 additions & 11 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@ name: Pages
on:
push:
branches:
- source # default branch
- main # default branch

jobs:
pages:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js v16.18.1
uses: actions/setup-node@v1
- uses: actions/checkout@v3
with:
node-version: '16.18.1'
token: ${{ secrets.GITHUB_TOKEN }}
# If your repository depends on submodule, please see: https://github.com/actions/checkout
submodules: recursive
- name: Use Node.js 16.x
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Cache NPM dependencies
uses: actions/cache@v2
with:
Expand All @@ -25,9 +29,20 @@ jobs:
run: yarn install
- name: Build
run: yarn build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_branch: master # deploying branch
path: ./public
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit 2a342ca

Please sign in to comment.