document version compatibility policy (#41) #166
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
name: Deploy | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.123.0' | |
extended: true | |
- name: Build | |
run: hugo --minify -d build | |
- name: Push build results to separate branch # purely for debuggability | |
if: ${{ github.event_name == 'push' }} | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build | |
publish_branch: build | |
- name: Serve the site # needed so we can run the link checker | |
run: | | |
npm install -g http-server | |
http-server build -p 8080 & | |
- name: Install filiph/linkcheck | |
run: | | |
wget https://github.com/filiph/linkcheck/releases/download/3.0.0/linkcheck-3.0.0-linux-x64.tar.gz | |
tar xfz linkcheck-3.0.0-linux-x64.tar.gz --strip-components=1 | |
- name: Run linkcheck | |
run: ./linkcheck -e -d --check-anchors --skip-file .github/workflows/linkcheck-skipfile.txt http://localhost:8080 | |
- uses: burnett01/rsync-deployments@796cf0d5e4b535745ce49d7429f77cf39e25ef39 # v7.0.1 | |
if: ${{ github.event_name == 'push' }} | |
with: | |
switches: -avzr --delete | |
path: ./build/ | |
remote_path: / # rrsync configuration points this to the correct path | |
remote_host: ${{ secrets.DEPLOY_HOST }} | |
remote_port: ${{ secrets.DEPLOY_PORT }} | |
remote_user: ${{ secrets.DEPLOY_USER }} | |
remote_key: ${{ secrets.DEPLOY_KEY }} |