Skip to content

Commit

Permalink
refactor: use actions/deploy-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
renbaoshuo committed Aug 18, 2024
1 parent b6ed789 commit 98338fd
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,19 @@ jobs:
if: github.event_name == 'push'
runs-on: ubuntu-latest
needs: [build]
timeout-minutes: 15
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: ${{ github.workspace }}/out/

- run: ls -R ${{ github.workspace }}/out/

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
id: deployment
uses: actions/deploy-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: out
cname: baoshuo.ren
user_name: BaoshuoBot
user_email: [email protected]
artifact_name: dist
## Is this attempting to deploy a pull request as a GitHub Pages preview site?
## NOTE: This feature is only in alpha currently and is not available to the public!
# preview: ${{ github.event_name != 'push' }}

0 comments on commit 98338fd

Please sign in to comment.