v2025.1.4 #270
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
## Author: Alper Sarikaya | |
## Last modified: 2021-10-24 🎃 | |
## This script should be run only when a released is published *for the current year*. | |
## | |
## This action will build the entire site from scratch, taking ALL commits from *other* | |
## branches as production-ready, and only checking out the current year's branch up to | |
## the tagged release SHA. | |
## | |
## NOTE: only create releases on the latest branch (currently: vis2022). | |
## e.g., `git checkout {sha}`, `git tag -a v2022.1.1 -m "v2022.1.1"`, | |
## `git push --tags`, and then create a release in GitHub from that tag. | |
## | |
## | |
## This script is based on staging.yml. The only differences: | |
## * the triggers are published releases, not any push to the repository | |
## * the initial checkout also gets available tags | |
## * the `release` event's tag is used to check out the current branch | |
## (disregarding any commits made after the release was created) | |
## * the script deploys to production instead of staging | |
name: deploy production on release | |
on: | |
release: | |
# deploy production whenever someone publishes a release on the current year's branch. | |
types: | |
- published | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
## SET UP STEPS | |
- uses: actions/checkout@v2 | |
- name: Get all branches+tags and checkout master | |
run: | | |
git fetch --force --tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* | |
git checkout master | |
- name: Set up Python 3.8.x | |
uses: actions/setup-python@v1 | |
with: | |
python-version: '3.8.x' | |
- name: Install python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r scripts/requirements.txt | |
- name: Install Ruby 2.6 | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '2.6' | |
- name: Install ruby dependencies | |
run: | | |
gem install bundler -v 2.4.22 | |
bundle | |
- name: Set up AWS credentials (+ set default user) | |
run: | | |
mkdir -p ~/.aws | |
touch ~/.aws/credentials | |
echo "[default] | |
aws_access_key_id = ${{ secrets.aws_deploy_key_id }} | |
aws_secret_access_key = ${{ secrets.aws_secret_access_key }}" > ~/.aws/credentials | |
## SET IEEEVIS_AWS_USER environment variable to "default" in deploy step | |
## BUILD ARCHIVE YEARS (2018 and before) | |
- name: Build archive years | |
run: make site | |
## BUILD PREVIOUS YEARS (currently: vis2019, vis2020, vis2021, vis2022, vis2023) | |
- name: Build previous year (2019) | |
run: | | |
git switch -f vis2019 | |
make new2019 | |
- name: Build previous year (2020) | |
run: | | |
git switch -f vis2020 | |
make new2020 | |
- name: Build previous year (2021) | |
run: | | |
git switch -f vis2021 | |
make new2021 | |
- name: Build previous year (2022) | |
run: | | |
git switch -f vis2022 | |
make new2022 | |
- name: Build previous year (2023) | |
run: | | |
git switch -f vis2023 | |
make new2023 | |
- name: Build previous year (2024) | |
run: | | |
git switch -f vis2024 | |
make new2024 | |
## BUILD THIS YEAR (currently: vis2025) | |
## ./scripts/fix_file_extensions.sh moves some evergreen content from current year | |
## ∟ also only check out the tag linked to the triggering event | |
- name: Build this year (2025) + deploy | |
env: | |
IEEEVIS_AWS_USER: default | |
AWS_DISTRIBUTION_ID: ${{ secrets.aws_distribution_id_production }} | |
run: | | |
git switch -f --detach ${{ github.event.release.tag_name }} | |
make release2025 |