forked from WordPress/wordpress-playground
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (34 loc) · 1.47 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
36
37
name: Deploy to playground.wordpress.net
on:
workflow_dispatch:
# Deploy the website every day at 9am and 6pm UTC
schedule:
- cron: '0 9,18 * * *'
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.event_name == 'workflow_dispatch' ||
github.actor == 'adamziel' ||
github.actor == 'dmsnell' ||
github.actor == 'bgrgicak' ||
github.actor == 'brandonpayton'
)
# 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.