Fix dead links (#23) #18
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
# | |
# This workflow is adapted from guide.ubuntu-mate.org! Changes made here must | |
# be applied to that repository and vice versa. | |
# | |
name: CI | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
publish: | |
name: Publish | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt-get install pandoc | |
- name: Build | |
run: | | |
online/build.sh | |
- name: Publish to Cloudflare Pages | |
if: ${{ github.event_name == 'push' && github.repository == 'ubuntu-mate/ubuntu-mate-guide' && github.ref == 'refs/heads/master' }} | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: e6fe5e31e8183c8192347f15af553766 | |
projectName: guide-ubuntu-mate-org | |
directory: online/build | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
- name: Purge Cloudflare Cache | |
if: ${{ github.event_name == 'push' && github.repository == 'ubuntu-mate/ubuntu-mate-guide' && github.ref == 'refs/heads/master' }} | |
run: | | |
curl -X POST --fail-with-body https://api.cloudflare.com/client/v4/zones/${{secrets.CLOUDFLARE_ZONE_ID}}/purge_cache -H "Authorization: Bearer ${{secrets.CLOUDFLARE_API_TOKEN}}" -H "Content-Type: application/json" --data '{"purge_everything":true}' | |
test: | |
name: Proofing | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt-get install pandoc ruby-html-proofer | |
- name: Check links | |
run: | | |
pandoc -f docbook -t html -s -o ubuntu-mate-guide.html index.docbook | |
htmlproofer --only-4xx ubuntu-mate-guide.html | |
- name: Test for errors | |
run: | | |
cd guide.ubuntu-mate.org/ | |
scripts/test.sh |