Merge pull request #2136 from petraspecht/petraspecht-patch-1 #2210
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: 2020-10-24 🎃 | |
## This script should be run on every commit to an active branch on this repository. | |
## This action will build the entire site from scratch and deploy to the staging S3 bucket. | |
name: build staging | |
on: | |
push: | |
# build staging whenever someone pushes to master (archive), previous year's (vis2019, | |
# vis2020, vis2021, vis2022, vis2023, vis2024), or this year's site (vis2025) | |
branches: | |
- master | |
- vis2019 | |
- vis2020 | |
- vis2021 | |
- vis2022 | |
- vis2023 | |
- vis2024 | |
- vis2025 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
## SET UP STEPS | |
- uses: actions/checkout@v2 | |
- name: Get all branches and checkout master | |
run: | | |
git fetch --no-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 3.0 | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.0' | |
- 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) | |
- 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 | |
- name: Build this year (2025) + deploy | |
env: | |
IEEEVIS_AWS_USER: default | |
AWS_DISTRIBUTION_ID: ${{ secrets.aws_distribution_id_staging }} | |
run: | | |
git switch -f vis2025 | |
make staging2025 | |