Removing 23.10 from downloads as it went EOL #445
Workflow file for this run
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: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
with: { fetch-depth: 0 } | |
- name: Cache RubyGems | |
uses: actions/cache@v2 | |
env: | |
cache-name: rubygems | |
with: | |
path: vendor/bundle | |
key: ${{ runner.os }}-${{ hashFiles('**/Gemfile.lock') }} | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install ruby ruby-dev make gcc | |
sudo gem install bundler --version 2.2.16 | |
sudo apt-get install transmission-cli python3-requests python3-yaml translate-toolkit rsync python3-polib webp | |
bundle config path vendor/bundle | |
bundle install --jobs=4 | |
# 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: Build Website with locales | |
run: | | |
scripts/build.sh --locales | |
- name: Proofing with locales | |
run: | | |
scripts/test.sh | |
- name: Generate WebP images | |
run: | | |
scripts/helpers/generate-webp.sh | |
- name: Deploy to server | |
if: ${{ github.event_name == 'push' && github.repository == 'ubuntu-mate/ubuntu-mate.org' }} | |
run: | | |
mkdir -p $HOME/.ssh/ | |
chmod 700 $HOME/.ssh/ | |
echo -n "${{ secrets.SSH_MATEY }}" > $HOME/.ssh/id_rsa | |
chmod 600 $HOME/.ssh/id_rsa | |
scripts/deploy.sh |