-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (55 loc) · 2.07 KB
/
main.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
on: push
name: 🚀 Deploy website on push
jobs:
build:
name: ⛏ Build
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@main
- name: ✅ Install Node
uses: actions/setup-node@v3
with:
node-version: "18"
- name: 🐉 Install Yarn
run: npm install -g yarn
- name: 📦 Installing Packages
run: yarn install
- name: 🏗️ Buidling Project
env:
PUBLIC_SANITY_PROJECT_ID: ${{ secrets.PUBLIC_SANITY_PROJECT_ID }}
PUBLIC_SANITY_DATASET: ${{ secrets.PUBLIC_SANITY_DATASET }}
PUBLIC_SANITY_GRAPHQL_URL: ${{ secrets.PUBLIC_SANITY_GRAPHQL_URL }}
run: yarn build
working-directory: ./web
- name: 📥 Archive production artifact
uses: actions/upload-artifact@main
with:
name: dist
path: web/dist/
deploy:
name: 🎉 Deploy
needs: build
runs-on: ubuntu-latest
steps:
# - name: 🚚 Get latest code
# uses: actions/checkout@main
- name: ⬇️ Download artifact
uses: actions/download-artifact@main
with:
name: dist
- name: 🧪 Test Artifact
run: ls -R
- name: 🌐 Global Config
run: git config --global user.email "[email protected]" && git config --global user.name "Your Name"
- name: 🎛️ Gitify
run: git init
- name: 🕸️ Commit
run: git add . && git commit -m "Init"
- name: 📂 Sync files
uses: SamKirkland/[email protected]
with:
ftp-server: ${{ secrets.FTP_SERVER }}
ftp-username: ${{ secrets.FTP_USERNAME }}
ftp-password: ${{ secrets.FTP_PASSWORD }}
git-ftp-args: --insecure