Skip to content

Commit c5c7bcf

Browse files
authored
Use GitHub Action for deployment.
This allows using the repo's `GITHUB_TOKEN` and will only push when there's actual changes.
1 parent a44ed57 commit c5c7bcf

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@ jobs:
1717
path: target
1818
key: cargo-build-${{ hashFiles('**/Cargo.lock') }}
1919
restore-key: cargo-build-
20-
- name: Build Blog
21-
run: cargo run
22-
- name: Deploy to GitHub Pages
23-
run: |
24-
cp CNAME ./site/
25-
curl -LsSf https://raw.githubusercontent.com/rust-lang/simpleinfra/master/setup-deploy-keys/src/deploy.rs | rustc - -o /tmp/deploy
26-
(cd site/ && /tmp/deploy)
27-
env:
28-
GITHUB_DEPLOY_KEY: ${{ secrets.GITHUB_DEPLOY_KEY }}
20+
- run: cargo run
21+
- run: cp CNAME ./site/
22+
- uses: JamesIves/github-pages-deploy-action@releases/v3
2923
if: github.ref == 'refs/heads/master'
24+
with:
25+
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
BRANCH: gh-pages
27+
FOLDER: site

0 commit comments

Comments
 (0)