Shop: Improve shirts graphic #458
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: | |
name: Publish | |
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: Publish 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 }} | |
- name: Purge Cloudflare Cache | |
if: ${{ github.event_name == 'push' && github.repository == 'ubuntu-mate/ubuntu-mate.org' && 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}' |