-
Notifications
You must be signed in to change notification settings - Fork 7
50 lines (47 loc) · 1.51 KB
/
deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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