Skip to content

(merge) Merge adhesh's branch to main #22

(merge) Merge adhesh's branch to main

(merge) Merge adhesh's branch to main #22

Workflow file for this run

# Sample workflow for building and deploying an ssg site to GitHub pages
name: ci
on:
push:
branches: [main]
workflow_dispatch:
# 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
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
steps:
- uses: actions/checkout@v4
- name: setup go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: build ssg
run: go build
- name: build site with ssg
run: |
./ssg
- name: upload /rendered
uses: actions/upload-artifact@master
with:
path: 'rendered'
if-no-files-found: error
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
steps:
- name: download /rendered
uses: actions/download-artifact@master
- name: setup gh-pages
uses: actions/configure-pages@v4
- name: unpack artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'artifact'
- name: deploy site
id: deployment
uses: actions/deploy-pages@v4