From a09ec6b0b5dcba2e6717fd1e56d8bb2c0da80b2b Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Mon, 19 Sep 2022 22:22:11 +0200 Subject: [PATCH] deployment: next try --- .github/workflows/delpoy.yml | 16 ------------ .github/workflows/deploy.yml | 47 ++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 16 deletions(-) delete mode 100644 .github/workflows/delpoy.yml create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/delpoy.yml b/.github/workflows/delpoy.yml deleted file mode 100644 index d13d0d77..00000000 --- a/.github/workflows/delpoy.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Build & Deploy - -on: [workflow_dispatch] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v3 - with: - node-version: 16 - cache: "npm" - - run: npm ci && cd repl && npm ci && cd ../tutorial && npm ci - - run: npm run build - - run: npm run deploy diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..9767c1a4 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,47 @@ +name: Build & Deploy + +on: [workflow_dispatch] + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v3 + with: + node-version: 16 + cache: "npm" + - name: Install Dependencies + - run: npm ci && cd repl && npm ci && cd ../tutorial && npm ci + + - name: Build + - run: npm run build + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Pages + uses: actions/configure-pages@v2 + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + # Upload entire repository + path: "./out" + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1