This repository has been archived by the owner on Apr 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
80 lines (64 loc) · 2.15 KB
/
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: 🤸🏽 Integrate & Deploy
on: [push]
permissions:
actions: write
contents: read
jobs:
lint:
name: 🤸🏽 lint, build & deploy
runs-on: ubuntu-22.04
permissions:
actions: write
id-token: write # Needed for auth with Deno Deploy
contents: read # Needed to clone the repository
steps:
- name: 🛡 Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
- name: 🐑 Clone Git Repo
uses: actions/checkout@v3
- name: 🦀 Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
- name: ⛓ Install Node deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false
- name: 🦕 Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.22
- name: 🔬 Lint
run: npm run lint
- name: 🦀 Install wasm-ack
uses: jetli/wasm-pack-action@v0.3.0
- name: 💿 Remix Build
run: npm run build
# TODO: vendor..?
# TODO fork action so only upload public & build dirs
# then skip this step
- name: 🗑️ Throw out deps
run: rm -rf ./packages/remix-app/node_modules
- name: 🗑️ Throw out more deps
run: rm -rf ./node_modules
- name: 📂 Make deno and remix dir
run: mkdir -p ./deno
- name: 📝 Copy Remix build files into outut dir
run: cp -R ./packages/remix-app/{build,public} ./deno
- name: 📝 Copy Rust WASM package files into output dir
run: mkdir -p ./deno/rust_functions/build/ && cp -R ./packages/rust_functions/build/browser ./deno/rust_functions/build
- name: 🔍 List file contents of root
run: tree ./
- name: 🔍 List file contents of deno dir
run: tree ./deno
- name: 🗄 Archive built ouput
uses: actions/upload-artifact@v3
with:
name: Deno Build Package
path: ./deno
- name: 🚛 Ship It
uses: denoland/deployctl@v1
with:
project: "remix-air-metal-stack"
entrypoint: "./build/index.js"
root: "./deno"