|
1 | | -name: Build & Deploy |
| 1 | +name: Deploy to GitHub Pages |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | workflow_dispatch: {} |
|
8 | 8 |
|
9 | 9 | env: |
10 | 10 | hugo_version: 0.115.3 |
11 | | - # unused, because GitHub Actions won't allow you to use it in uses: |
12 | | - # context for now |
13 | | - gmnhg_version: v0.4.2 |
14 | 11 |
|
15 | 12 | jobs: |
16 | | - build-deploy: |
17 | | - name: Build & Deploy Website |
| 13 | + deploy: |
| 14 | + name: Deploy to GitHub Pages |
18 | 15 | runs-on: ubuntu-latest |
19 | 16 | steps: |
20 | 17 | - name: Checkout |
21 | 18 | uses: actions/checkout@v2 |
22 | 19 | - name: Install Hugo |
23 | 20 | run: | |
24 | | - wget \ |
25 | | - -O hugo.tar.gz \ |
26 | | - https://github.com/gohugoio/hugo/releases/download/v${hugo_version}/hugo_extended_${hugo_version}_linux-amd64.tar.gz |
27 | | - tar -xv \ |
28 | | - -f hugo.tar.gz \ |
| 21 | + wget -qO- \ |
| 22 | + https://github.com/gohugoio/hugo/releases/download/v${hugo_version}/hugo_extended_${hugo_version}_linux-amd64.tar.gz \ |
| 23 | + | tar -x -z -v \ |
29 | 24 | -C /usr/local/bin \ |
30 | 25 | hugo |
31 | 26 | - name: Build website with Hugo |
|
34 | 29 | hugo -d ./hugo |
35 | 30 | env: |
36 | 31 | HUGO_ENV: production |
37 | | - - name: Build Gemini site with gmnhg |
38 | | - uses: docker://ghcr.io/tdemin/gmnhg:v0.4.2 |
| 32 | + - name: Deploy to GitHub Pages branch |
| 33 | + uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 |
39 | 34 | with: |
40 | | - args: gmnhg -output ./gmnhg |
41 | | - - name: Deploy web site |
42 | | - # v6.0.0, strict commit pinning due to handling secrets |
43 | | - uses: Burnett01/rsync-deployments@45d84ad5f6c174f3e0ffc50e9060a9666d09c16e |
44 | | - with: |
45 | | - switches: -avzr --delete |
46 | | - path: hugo/ |
47 | | - remote_path: ${{ secrets.DEPLOY_ROOT_PATH }}/blog.tdem.in |
48 | | - remote_host: ${{ secrets.DEPLOY_HOST }} |
49 | | - remote_user: ${{ secrets.DEPLOY_USER }} |
50 | | - remote_key: ${{ secrets.DEPLOY_KEY }} |
51 | | - - name: Deploy Gemini site |
52 | | - # GitHub Actions doesn't allow anchors in workflow YAML, so |
53 | | - # duplicating this is required |
54 | | - uses: Burnett01/rsync-deployments@45d84ad5f6c174f3e0ffc50e9060a9666d09c16e |
55 | | - with: |
56 | | - switches: -avzr --delete |
57 | | - path: gmnhg/ |
58 | | - remote_path: ${{ secrets.DEPLOY_ROOT_PATH }}/gemini |
59 | | - remote_host: ${{ secrets.DEPLOY_HOST }} |
60 | | - remote_user: ${{ secrets.DEPLOY_USER }} |
61 | | - remote_key: ${{ secrets.DEPLOY_KEY }} |
| 35 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 36 | + publish_dir: ./hugo |
| 37 | + cname: tdem.in |
0 commit comments