cronjob deploy 🚀 of 64d5a3b at Sun Oct 20 01:00:47 UTC 2024 #1133
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
name: Deploy | |
on: | |
push: | |
branches: | |
- release | |
permissions: | |
contents: write | |
jobs: | |
build-and-deploy: | |
# prevents this action from running on forks | |
if: github.repository == 'Roma-JS/roma-js-on-astro' | |
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession. | |
runs-on: ubuntu-22.04 | |
env: | |
HUSKY: '0' | |
TZ: 'Europe/Rome' | |
PUBLIC_SITE_URL: "https://romajs.org" | |
steps: | |
- name: Checkout 🛎️ | |
uses: 'actions/checkout@v4' | |
with: | |
fetch-depth: 0 | |
- uses: pnpm/action-setup@v2 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'pnpm' | |
- name: Enable corepack | |
run: 'corepack enable' | |
- name: log node & package manager | |
run: 'printf "node -> %s\npnpm -> %s" "$(node -v)" "$(pnpm -v)"' | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Build site | |
run: pnpm run build | |
- name: Post build actions | |
run: touch ./dist/.nojekyll # Avoids 404 when pathname includes underscores | |
- name: Deploy roma-js site 🚀 | |
uses: JamesIves/[email protected] | |
with: | |
repository-name: "Roma-JS/roma-js.github.io" | |
token: ${{ secrets.DEPLOY_TOKEN }} | |
branch: "master" # The branch the action should deploy to. | |
folder: dist | |
clean: true | |
clean-exclude: | # These files do not get wiped | |
CNAME |