Skip to content

1499 installer re-release #166

1499 installer re-release

1499 installer re-release #166

Workflow file for this run

name: Website build
on:
push:
branches:
- 2016-redesign
tags:
- '*'
jobs:
build:
runs-on: debian:bullseye
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install python
uses: actions/setup-python@v2
with:
python-version: '2.7'
- name: Install packages
run: |
sudo apt-get -y install gettext libjpeg-turbo-progs optipng python3-pip python3-virtualenv subversion
- uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }}
- name: Install pelican & pelican plugins
run: |
pip install -r requirements.txt
svn co https://github.com/getpelican/pelican-plugins.git/trunk pelican-plugins
- name: Build
run: |
if [[ $GITHUB_REF == "refs/heads/2016-redesign" ]]
then
export SITEURL="https://staging.freenetproject.org"
else
export SITEURL="https://freenetproject.org"
fi
make html
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Upload to bucket
run: |
aws configure set preview.cloudfront true
if [[ $GITHUB_REF == "refs/heads/2016-redesign" ]]
then
echo "deploying to staging"
aws s3 sync output/ s3://website-staging.freenetproject.org
aws cloudfront create-invalidation --distribution-id E163US17FGFURH --paths '/*'
else
echo "deploying to prod"
aws s3 sync output/ s3://website-freenetproject.org
aws cloudfront create-invalidation --distribution-id E27NPK5X62XM5M --paths '/*'
fi
env:
GITHUB_REF: ${{ env.GITHUB_REF }}
- name: IRC notify
uses: rectalogic/notify-irc@v1
with:
channel: "#freenet"
server: irc.libera.chat
nickname: github-actions-notify
message:
${{ github.actor }} deployed ${{ github.event.compare }} to the website (${{ github.event.ref }}).