Skip to content

Commit

Permalink
Merge pull request #1114 from Turbo87/gha-deploy
Browse files Browse the repository at this point in the history
CI: Use `actions/deploy-pages` to deploy to GitHub Pages
  • Loading branch information
jdno authored Jul 18, 2023
2 parents 86cb3a8 + 9ddea34 commit 82dc202
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ on:
pull_request:

jobs:
ci:
name: CI
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -43,9 +42,25 @@ jobs:
- run: cargo run
- run: cp CNAME ./site/
- run: touch site/.nojekyll
- uses: JamesIves/github-pages-deploy-action@releases/v3
if: github.ref == 'refs/heads/master'

- uses: actions/[email protected]
with:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: site
path: site

deploy:
if: ${{ github.ref == 'refs/heads/master' }}

needs: build

permissions:
pages: write
id-token: write

runs-on: ubuntu-latest
steps:
- id: deployment
uses: actions/[email protected]

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

0 comments on commit 82dc202

Please sign in to comment.