-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1114 from Turbo87/gha-deploy
CI: Use `actions/deploy-pages` to deploy to GitHub Pages
- Loading branch information
Showing
1 changed file
with
22 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,7 @@ on: | |
pull_request: | ||
|
||
jobs: | ||
ci: | ||
name: CI | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -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 }} |