Skip to content

Deploy to playground.wordpress.net #276

Deploy to playground.wordpress.net

Deploy to playground.wordpress.net #276

Workflow file for this run

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.