Skip to content

deploy

deploy #1

name: deploy
on:
workflow_run:
workflows: [update-contributor-details]
types: [completed]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setting up python environment
uses: actions/[email protected]
- name: Replace md table with HTML table
run: |
if [ -f ".github/data/contributors-log.json" ]; then
python .github/scripts/convert_to_html_tables.py
else
echo "contributors log is not present, proceeding to deploy anyway..."
fi
env:
REPO_NAME: ${{ github.repository }}
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
# Deployment job
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