Skip to content

.github/workflows/deploy-to-github-pages.yml #1446

.github/workflows/deploy-to-github-pages.yml

.github/workflows/deploy-to-github-pages.yml #1446

on:
push:
branches:
- main
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '23 * 1-10 * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allow only one concurrent deployment.
concurrency:
group: "pages"
cancel-in-progress: true
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
- name: Generate HTML
run: go run .
- name: Create _site directory
run: |
mkdir -p ./_site
cp index.html ./_site
cp who-is-hiring.css ./_site
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v3
deploy:
# Deploy to the github-pages environment
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@v4