-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (32 loc) · 1.32 KB
/
build-website.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
name: Deploy to playground.wordpress.net
on:
workflow_dispatch:
workflow_run:
workflows: [Refresh WordPress assets]
types:
- completed
jobs:
build_and_deploy:
# Only run this workflow from the trunk branch and when it's triggered by another workflow OR dmsnell OR adamziel
if: >
github.ref == 'refs/heads/trunk' && (
github.event_name == 'workflow_run' ||
github.actor == 'adamziel' ||
github.actor == 'dmsnell'
)
# Specify runner + deployment step
runs-on: ubuntu-latest
environment:
name: playground-wordpress-net
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/prepare-playground
- run: npm run build
- run: tar -czf wasm-wordpress-net.tar.gz dist/packages/playground/wasm-wordpress-net
# Store dist/packages/artifacts/wasm-wordpress-net as a build artifact
- uses: actions/upload-artifact@v2
with:
name: playground-website
path: wasm-wordpress-net.tar.gz
# The artifact only becomes available after this workflow wraps up, so let's wrap.
# The deploy-website.yml workflow will pick up the artifact and deploy it.