-
Notifications
You must be signed in to change notification settings - Fork 7
32 lines (32 loc) · 966 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Main
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install -r requirements.txt
- name: Freeze HTML
run: python fedoralovespython.py freeze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- if: ${{ github.ref == 'refs/heads/master' }}
name: Deploy
run: python fedoralovespython.py deploy --no-freeze --push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- if: ${{ github.ref == 'refs/heads/master' }}
name: Purge Cloudflare cache
run: ./.cloudflare_purge_cache.sh
env:
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
CLOUDFLARE_EMAIL: ${{ secrets.CLOUDFLARE_EMAIL }}
CLOUDFLARE_AUTHKEY: ${{ secrets.CLOUDFLARE_AUTHKEY }}