Merge pull request #341 from betwixt-labs/cs-docs #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple workflow for deploying static content to Cloudflare Pages | |
name: Deploy Playground | |
on: | |
# Runs on pushes targeting the default branch | |
push: | |
branches: ["master"] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
# Single deploy job since we're just deploying | |
deploy: | |
runs-on: ubuntu-latest | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
deployments: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Get Environment Variables | |
id: dotenv | |
uses: falti/[email protected] | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: "8.0.x" # SDK Version to use; x will use the latest version of the 7.0 channel | |
dotnet-quality: 'preview' | |
- name: Build Playground | |
run: | | |
../scripts/install-wasi.sh | |
yarn install | |
yarn build:site | |
working-directory: ./playground/ | |
- name: Deploy Playground | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
projectName: bebopc-playground | |
directory: ${{github.workspace}}/playground/dist | |
# Optional: Enable this if you want to have GitHub Deployments triggered | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
branch: master |