-
-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (52 loc) · 1.32 KB
/
landing-deploy.yml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Deploy Landing Page
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: './landing-page/package-lock.json'
- name: Install Dependencies
run: npm ci
working-directory: ./landing-page
- name: Lint
run: npm run lint
working-directory: ./landing-page
- name: Build
run: npm run build
working-directory: ./landing-page
env:
CI: true
NODE_ENV: production
- name: Install Railway CLI
run: |
curl -fsSL https://railway.app/install.sh | sh
- name: Deploy to Railway
run: |
railway up \
--service b54b1497-e63d-4612-94d9-f2e1c781755e \
--detach
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
- name: Deploy to GitHub Pages (Backup)
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: landing-page/build
clean: true
single-commit: true
permissions:
contents: write