Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Rust

on:
push:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
branches: [ master ]
Expand All @@ -21,18 +22,21 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Prepare pages
run: ./prepare-pages.sh

- name: Deploy GitHub Pages
# Do not deploy PRs.
if: ${{ github.event_name != 'pull_request' }}
run: |
git worktree add gh-pages gh-pages
git config user.name "Deploy from CI"
git config user.email ""
cd gh-pages
# Delete the ref to avoid keeping history.
git update-ref -d refs/heads/gh-pages
rm -rf *
mv ../output/* .
git add .
git commit -m "Deploy $GITHUB_SHA to gh-pages"
git -c 'user.name=github-actions[bot]' -c 'user.email=41898282+github-actions[bot]@users.noreply.github.com' \
commit -m "Deploy $GITHUB_SHA to gh-pages"
git push --force