Skip to content

Merge branch 'main_v2' of https://github.com/BA-OST-Index/ost_data_si… #110

Merge branch 'main_v2' of https://github.com/BA-OST-Index/ost_data_si…

Merge branch 'main_v2' of https://github.com/BA-OST-Index/ost_data_si… #110

Workflow file for this run

name: Push
on:
push:
branches:
- 'main_v2'
workflow_dispatch:
repository_dispatch:
types: [ost-data-parser-push-direct]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install necessary Python packages
run: |
pip install -r requirements.txt
- name: Update submodules
run: |
git submodule update --remote
# Parser part
- name: Init encironment for Parser
run: bash push_init.sh
- name: Run Parser's main.py
run: |
cd data_parser
python main.py
cd ..
# Generator part
- name: Run generator's custom prechecking
run: python prechecker.py
- name: Run generator's main.py
run: python main_prod.py
# Deployment
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# Upload entire repository
path: './data_html'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
- name: CloudFlare Page Purge
uses: jakejarvis/cloudflare-purge-action@master
env:
CLOUDFLARE_ZONE: ${{ secrets.CF_PURGE_ZONE }}
CLOUDFLARE_TOKEN: ${{ secrets.CF_TOKEN }}
- name: Invalidate CloudFront
uses: chetan/invalidate-cloudfront-action@v2
env:
DISTRIBUTION: ${{ secrets.AWS_CF_DISTRIBUTION }}
PATHS: "/*"
AWS_REGION: "us-east-1"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}