diff --git a/.github/workflows/generate-site.yml b/.github/workflows/generate-site.yml new file mode 100644 index 0000000..4cce646 --- /dev/null +++ b/.github/workflows/generate-site.yml @@ -0,0 +1,47 @@ +name: Generate Resources Site + +on: + push: + branches: [ main ] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.9' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pyyaml jinja2 + + - name: Generate HTML + run: python generate_site.py + + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: './dist' + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2