update preview workflow

This commit is contained in:
John Bowdre 2024-04-23 12:26:08 -05:00
parent aee5590326
commit dd1657058d

View file

@ -7,7 +7,7 @@ on:
- preview - preview
concurrency: # prevent concurrent deploys doing strange things concurrency: # prevent concurrent deploys doing strange things
group: deploy-preview-to-neocities group: deploy-preview
cancel-in-progress: true cancel-in-progress: true
# Default to bash # Default to bash
@ -29,8 +29,19 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
submodules: recursive submodules: recursive
- name: Connect to Tailscale
uses: tailscale/github-action@v2
with:
oauth-client-id: ${{ secrets.TS_API_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_API_CLIENT_SECRET }}
tags: ${{ secrets.TS_TAG }}
- name: Configure SSH known hosts
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts
- name: Build with Hugo - name: Build with Hugo
run: hugo --minify --environment preview run: HUGO_REMOTE_FONT_PATH=${{ secrets.REMOTE_FONT_PATH }} hugo --minify --environment preview
- name: Insert 404 page - name: Insert 404 page
run: | run: |
cp public/404/index.html public/not_found.html cp public/404/index.html public/not_found.html