forked from ironicbadger/neat-starter
-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (47 loc) · 1.36 KB
/
build.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
name: CI
on:
workflow_dispatch:
push:
branches:
- master
jobs:
ci:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 21
- run: npm install
- run: npm run build
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push container to GHCR
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64
push: true
tags: |
ghcr.io/tailscale-dev/society-of-pangolin-enthusiasts:latest
- name: Connect Tailscale
uses: tailscale/github-action@v2
with:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
tags: tag:devrel-ci
- name: Do the deploy thing
run: |
ssh -o "StrictHostKeyChecking no" ${{ secrets.VPS_USER }}@devrel-prodbox-nyc "
docker compose pull
docker compose up -d
"