Skip to content

Commit

Permalink
🎉 setup astro site and devOps workspaces (#1)
Browse files Browse the repository at this point in the history
* adds astro website dev env
* placeholder components dir
* github actions
    * deploy site
    * create releases
  • Loading branch information
scottnath authored Jul 3, 2023
1 parent 0aced8f commit 20b0a36
Show file tree
Hide file tree
Showing 104 changed files with 45,842 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/astro.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: GitHub Pages

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-22.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm run build
env:
AIRTABLE_API_KEY: ${{secrets.AIRTABLE_API_KEY}}
AIRTABLE_BASE_ID: ${{secrets.AIRTABLE_BASE_ID}}
- run: npm run site-files

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
personal_token: ${{ secrets.PERSONAL_TOKEN }}
publish_dir: ./workspaces/website/dist
publish_branch: main
external_repository: scottnath/scottnath.github.io
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release
on:
push:
branches:
- main

permissions:
contents: read # for checkout

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Install dependencies
run: npm clean-install
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx multi-semantic-release --logLevel=trace
5 changes: 5 additions & 0 deletions .multi-releaserc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
"deps": {
"bump": "inherit"
}
}
Loading

0 comments on commit 20b0a36

Please sign in to comment.