Skip to content

chore: add edge case #90

chore: add edge case

chore: add edge case #90

Workflow file for this run

name: github pages
on:
push:
branches:
- main
- develop
- fix-add_badge-script
schedule:
- cron: 0 13 * * 1 # At 13:00 on Monday
jobs:
deploy:
runs-on: ubuntu-22.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/[email protected]
with:
submodules: true
fetch-depth: 0
- name: Install curl
run: sudo apt update && sudo apt-get install -y libcurl4-openssl-dev
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: "4.4.1"
- name: Setup renv
uses: r-lib/actions/setup-renv@v2
with:
cache-version: 2
- name: Run scripts
run: |
Rscript scripts/add_badges.R
Rscript scripts/add_contributions.R
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
- name: Run visualisations
if: ${{ github.ref == 'refs/heads/fix-add_badge-script' }}
run: |
Rscript scripts/add_hexwall_network.R
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: "0.85.0"
extended: true
# main branch
- name: Build
if: ${{ github.ref == 'refs/heads/main' }}
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
# fix-add_badge-script branch
- name: Build
if: ${{ github.ref == 'refs/heads/fix-add_badge-script' }}
run: hugo -e staging
- name: Deploy to Netlify
uses: netlify/actions/cli@master
if: ${{ github.ref == 'refs/heads/fix-add_badge-script' }}
with:
args: deploy --dir=public --prod
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}