-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (51 loc) · 1.75 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
name: Build and Deploy
permissions:
actions: none
checks: none
contents: write
deployments: none
id-token: none
issues: none
discussions: none
packages: none
pages: none
pull-requests: none
repository-projects: none
security-events: none
statuses: none
on:
push:
branches: [main]
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }}
runs-on: self-hosted
steps:
- name: Checkout 🛎️
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
- uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
name: Setup node
with:
node-version: "18"
- name: Create env file
run: |
echo "VITE_MATRIX_SERVER_URL=https://matrix.art.midnightthoughts.space" > .env.local
echo "VITE_MATRIX_INSTANCE_ADMIN=@administrator:art.midnightthoughts.space" >> .env.local
echo "VITE_MATRIX_ROOT_FOLDER=#Matrix_Art:art.midnightthoughts.space" >> .env.local
- name: Install and Build 🔧
run: |
apt-get update && apt-get install -y patch
npm ci
mv .github/package.json.patch node_modules/matrix-js-sdk/package.json.patch
pushd node_modules/matrix-js-sdk/
patch package.json < package.json.patch
popd
npm run build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@ba1486788b0490a235422264426c45848eac35c6 # v4.4.1
env:
BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
branch: gh-pages # The branch the action should deploy to.
folder: dist # The folder the action should deploy.