Repository navigation
60 lines (51 loc) · 2.13 KB
/
Copy pathbuild.yml
File metadata and controls
60 lines (51 loc) · 2.13 KB
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
# Builds develop and publishes it to build/dev. PlaceOS releases publish to
# build/prod through RELEASE (release.yml). See docs/releases.md.
name: BUILD
on:
push:
branches: [develop]
permissions:
contents: read
jobs:
# Tests run in parallel with the build. The dev deploy does not wait for them.
test:
uses: ./.github/workflows/test.yml
build:
uses: ./.github/workflows/build-app.yml
with:
configuration: development
secrets: inherit
deploy-dev:
needs: [build]
# Pushes to build/dev
permissions:
contents: write
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: actions/checkout@v6
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: build-output
path: dist/backoffice/browser
# Vercel reads vercel.json from the pushed commit. Build branches
# hold only the built files, so add one that turns off deployments.
- name: Turn off Vercel deployments for the build branch
run: |
echo '{ "git": { "deploymentEnabled": false } }' > dist/backoffice/browser/vercel.json
- name: Deploy the application
uses: MrYuion/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: build/dev
FOLDER: dist/backoffice/browser
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MESSAGE: 'build(backoffice): [{sha}] CI build'
- name: Update Pipeline Chat Status
uses: fjogeleit/http-request-action@master
continue-on-error: true
with:
url: ${{ secrets.STATUS_URL }}
data: '{ "name": "${{ github.repository }}", "commit": "${{ github.sha }}", "pipeline_name": "backoffice", "branch": "${{ github.ref }}", "status": "${{ job.status }}", "url": "https://github.com/${{ github.repository }}/runs/${{ github.run_id }}" }'
if: ${{ always() }}