Revert "CI: Add step to purge Cloudflare cache" #460
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: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
# Due to localisation, perform a full deployment | |
# (other websites can use CloudFlare Pages app directly) | |
name: Full Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: { fetch-depth: 0 } | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.3' | |
bundler-cache: true | |
- name: Install additional dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install transmission-cli python3-requests python3-yaml translate-toolkit python3-polib webp | |
# Some RSS clients think all blog posts were modified at time of deploy. | |
# https://stackoverflow.com/a/36243002 | |
- name: Restore blog modification times | |
run: | | |
rev=$(git branch --show-current) | |
for f in $(git ls-tree -r -t --full-name --name-only "$rev"); do touch -d $(git log --pretty=format:%cI -1 "$rev" -- "$f") "$f"; done | |
- name: Build Website | |
run: | | |
scripts/build.sh --magnet-uri | |
- name: Proofing | |
run: | | |
scripts/test.sh | |
- name: Rebuild website with locales | |
run: | | |
scripts/build.sh --locales | |
- name: Proofing with locales | |
run: | | |
scripts/test.sh | |
- name: Push to Cloudflare Pages | |
if: ${{ github.event_name == 'push' && github.repository == 'ubuntu-mate/ubuntu-mate.org' && github.ref == 'refs/heads/master' }} | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: e6fe5e31e8183c8192347f15af553766 | |
projectName: ubuntu-mate-org | |
directory: _site | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} |