Merge branch 'main' of github.com:cdaringe/rad #62
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @info | |
# main & pull_request jobs cannot de-dupe their workflow configuration :( | |
# https://github.saobby.my.eu.orgmunity/t5/GitHub-Actions/Start-a-workflow-from-another-workflow/td-p/37586 | |
name: main | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# https://github.com/JamesIves/github-pages-deploy-action#getting-started-airplane | |
- name: checkout 🛎️ | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
# https://github.com/denolib/setup-deno | |
- uses: denolib/setup-deno@master | |
with: | |
deno-version: 1.46.3 | |
- name: ci | |
run: ./rad ci | |
# release | |
- name: setup-node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
npm init -y \ | |
&& \ | |
npm install -D \ | |
"@semantic-release/commit-analyzer" \ | |
"@semantic-release/release-notes-generator" \ | |
"@semantic-release/github" \ | |
"@semantic-release/git" \ | |
"@semantic-release/exec" \ | |
&& \ | |
npx semantic-release | |
# publish site after release to pick up new version numbers | |
- name: site | |
run: ./rad -l info site | |
- name: deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public |