mirror of
https://github.com/remko/waforth
synced 2024-12-25 09:59:07 +01:00
github: Publish pages
This commit is contained in:
parent
f9a07b2bcf
commit
7ccc11dd41
11 changed files with 67 additions and 77 deletions
46
.github/workflows/build-master.yml
vendored
Normal file
46
.github/workflows/build-master.yml
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
name: Build (master)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [master]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
uses: ./.github/workflows/build.yml
|
||||
|
||||
deploy-pages:
|
||||
needs: build
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v1
|
||||
|
||||
deploy-aws:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: sudo apt-get update
|
||||
- run: sudo apt-get install awscli
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: github-pages
|
||||
- run: |
|
||||
mkdir pages
|
||||
tar xf artifact.tar -C pages
|
||||
- run: ls -R pages
|
||||
- name: aws s3 sync
|
||||
run: |
|
||||
aws configure set region eu-central-1
|
||||
aws configure set aws_access_key_id ${{secrets.AWS_ACCESS_KEY_ID}}
|
||||
aws configure set aws_secret_access_key ${{secrets.AWS_SECRET_ACCESS_KEY}}
|
||||
aws s3 sync pages/ s3://${{secrets.AWS_SITE_BUCKET}}/waforth/
|
2
.github/workflows/build-standalone.yml
vendored
2
.github/workflows/build-standalone.yml
vendored
|
@ -13,7 +13,7 @@ jobs:
|
|||
os: [macos-latest, ubuntu-18.04, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/setup
|
||||
- run: make -C src/standalone install-deps package
|
||||
- run: make -C src/standalone check
|
||||
|
|
4
.github/workflows/build-vscode-extension.yml
vendored
4
.github/workflows/build-vscode-extension.yml
vendored
|
@ -10,6 +10,6 @@ jobs:
|
|||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/setup
|
||||
- run: make -C src/web/vscode-extension install-deps package
|
||||
- run: make -C src/web/vscode-extension install-deps package
|
||||
|
|
2
.github/workflows/build-waforthc.yml
vendored
2
.github/workflows/build-waforthc.yml
vendored
|
@ -13,7 +13,7 @@ jobs:
|
|||
os: [macos-latest, ubuntu-20.04]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/setup
|
||||
|
||||
- if: runner.os == 'macOS' || runner.os == 'Windows'
|
||||
|
|
15
.github/workflows/build.yml
vendored
15
.github/workflows/build.yml
vendored
|
@ -2,6 +2,7 @@ name: Build
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: ['*', '!master']
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
|
@ -10,9 +11,19 @@ jobs:
|
|||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/setup
|
||||
- run: yarnpkg build
|
||||
- run: make -C src/web/notebook
|
||||
- run: yarnpkg lint
|
||||
- run: yarnpkg test --coverage
|
||||
- run: make -C src/web/notebook
|
||||
- run: ./dist/wafnb2html src/web/notebook/examples/drawing-with-forth.wafnb
|
||||
|
||||
# Build & upload pages
|
||||
- run: |
|
||||
mkdir -p public/waforth/drawing-with-forth
|
||||
cp src/web/notebook/examples/drawing-with-forth.html public/waforth/drawing-with-forth/index.html
|
||||
shell: bash
|
||||
- uses: actions/upload-pages-artifact@v1
|
||||
with:
|
||||
path: public/waforth
|
||||
|
|
25
.github/workflows/publish-notebook.yml
vendored
25
.github/workflows/publish-notebook.yml
vendored
|
@ -1,25 +0,0 @@
|
|||
name: Publish Notebook
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
uses: ./.github/workflows/build.yml
|
||||
|
||||
publish:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/setup
|
||||
- run: sudo apt-get update
|
||||
- run: sudo apt-get install awscli
|
||||
- run: make -C src/web/notebook
|
||||
- run: ./dist/wafnb2html src/web/notebook/examples/drawing-with-forth.wafnb
|
||||
- name: aws s3 sync
|
||||
run: |
|
||||
aws configure set region eu-central-1
|
||||
aws configure set aws_access_key_id ${{secrets.AWS_ACCESS_KEY_ID}}
|
||||
aws configure set aws_secret_access_key ${{secrets.AWS_SECRET_ACCESS_KEY}}
|
||||
aws s3 cp src/web/notebook/examples/drawing-with-forth.html s3://${{secrets.AWS_SITE_BUCKET}}/wafnb/drawing-with-forth/index.html
|
18
.github/workflows/publish-release.yml
vendored
18
.github/workflows/publish-release.yml
vendored
|
@ -12,24 +12,8 @@ jobs:
|
|||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/setup
|
||||
- run: yarnpkg publish --non-interactive
|
||||
env:
|
||||
NPM_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||
|
||||
publish-site:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/setup
|
||||
- run: sudo apt-get update
|
||||
- run: sudo apt-get install awscli
|
||||
- run: yarnpkg build
|
||||
- name: aws s3 sync
|
||||
run: |
|
||||
aws configure set region eu-central-1
|
||||
aws configure set aws_access_key_id ${{secrets.AWS_ACCESS_KEY_ID}}
|
||||
aws configure set aws_secret_access_key ${{secrets.AWS_SECRET_ACCESS_KEY}}
|
||||
aws s3 sync public/waforth/ s3://${{secrets.AWS_SITE_BUCKET}}/waforth/
|
||||
|
|
2
.github/workflows/publish-standalone.yml
vendored
2
.github/workflows/publish-standalone.yml
vendored
|
@ -15,7 +15,7 @@ jobs:
|
|||
os: [macos-latest, ubuntu-18.04, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/setup
|
||||
- run: make -C src/standalone install-deps package
|
||||
- run: make -C src/standalone check
|
||||
|
|
26
.github/workflows/publish-thurtle.yml
vendored
26
.github/workflows/publish-thurtle.yml
vendored
|
@ -1,26 +0,0 @@
|
|||
name: Publish Thurtle
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
uses: ./.github/workflows/build.yml
|
||||
|
||||
publish:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/setup
|
||||
- run: sudo apt-get update
|
||||
- run: sudo apt-get install awscli
|
||||
- run: yarnpkg build
|
||||
- name: aws s3 sync
|
||||
run: |
|
||||
aws configure set region eu-central-1
|
||||
aws configure set aws_access_key_id ${{secrets.AWS_ACCESS_KEY_ID}}
|
||||
aws configure set aws_secret_access_key ${{secrets.AWS_SECRET_ACCESS_KEY}}
|
||||
aws s3 sync public/thurtle/ s3://${{secrets.AWS_SITE_BUCKET}}/thurtle/
|
||||
aws s3 sync public/waforth/dist/ s3://${{secrets.AWS_SITE_BUCKET}}/waforth/dist/ --exclude "*" --include "thurtle-*" --include "logo-*.svg" --include "turtle-*.svg"
|
||||
|
2
.github/workflows/publish-waforthc.yml
vendored
2
.github/workflows/publish-waforthc.yml
vendored
|
@ -15,7 +15,7 @@ jobs:
|
|||
os: [macos-latest, ubuntu-20.04]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/setup
|
||||
|
||||
- if: runner.os == 'macOS' || runner.os == 'Windows'
|
||||
|
|
|
@ -98,7 +98,7 @@ async function handleBuildFinished(result) {
|
|||
["WAForh Benchmarks", "benchmarks", "public/waforth/benchmarks"],
|
||||
["WAForth Prompt Example", "prompt", "public/waforth/examples/prompt"],
|
||||
["WAForth Fetch Example", "fetch", "public/waforth/examples/fetch"],
|
||||
["Thurtle", "thurtle", "public/thurtle", true],
|
||||
["Thurtle", "thurtle", "public/waforth/thurtle", true],
|
||||
];
|
||||
for (const [title, base, outpath, bs] of indexes) {
|
||||
let index = INDEX_TEMPLATE.replace(/\$BASE/g, base).replace(
|
||||
|
|
Loading…
Reference in a new issue