File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ name : deploy docs preview
2+ on :
3+ pull_request :
4+ branches : " main"
5+ types : ['opened', 'synchronize', 'reopened', 'closed']
6+
7+ jobs :
8+ deploy-preview :
9+ runs-on : ubuntu-24.04
10+ if : ${{ !github.event.pull_request.head.repo.fork }}
11+ name : Build and deploy
12+ steps :
13+ - uses : actions/checkout@v4
14+
15+ - name : Setup `spin`
16+ uses : fermyon/actions/spin/setup@v1
17+ with :
18+ github_token : ${{ secrets.GITHUB_TOKEN }}
19+
20+ - name : Install npm packages
21+ run : |
22+ npm ci
23+ npm ci --prefix ./spin-up-hub
24+
25+ - name : Build app
26+ run : |
27+ spin build
28+
29+ - name : build and deploy preview
30+ uses : fermyon/actions/spin/preview@v1
31+ env :
32+ # Create archive layers to consolidate the hundreds of static asset layers together
33+ SPIN_OCI_ARCHIVE_LAYERS : 1
34+ with :
35+ fermyon_token : ${{ secrets.FERMYON_CLOUD_TOKEN }}
36+ github_token : ${{ secrets.GITHUB_TOKEN }}
37+ undeploy : ${{ github.event.pull_request && github.event.action == 'closed' }}
You can’t perform that action at this time.
0 commit comments