From c7ffdf51f2cf39bdac8a8da6556a95c02845bd0b Mon Sep 17 00:00:00 2001 From: Braulio Rivas Abad Date: Thu, 9 May 2024 21:20:39 -0500 Subject: [PATCH] configure possible workflows for dmX --- .github/workflows/development.yml | 20 +++++++++++++ .github/workflows/preview.yml | 20 +++++++++++++ .github/workflows/static.yml | 48 +++++++++---------------------- 3 files changed, 53 insertions(+), 35 deletions(-) create mode 100644 .github/workflows/development.yml diff --git a/.github/workflows/development.yml b/.github/workflows/development.yml new file mode 100644 index 00000000..90f50625 --- /dev/null +++ b/.github/workflows/development.yml @@ -0,0 +1,20 @@ +name: Deploy dmX beta to GitHub Pages +on: + push: + branches: [beta] + +permissions: + contents: write +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v3 + + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: . + clean-exclude: pr-preview/ + target-folder: beta/ diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index e69de29b..0c5cc030 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -0,0 +1,20 @@ +name: Deploy PR previews to GitHub Pages +concurrency: preview-${{ github.ref }} +on: + pull_request: + types: + - opened + - reopened + - synchronize + - closed +jobs: + deploy-preview: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: rossjrw/pr-preview-action@v1 + with: + source-dir: . + preview-branch: gh-pages + umbrella-dir: pr-preview + action: auto diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 3ebb50b8..1e126914 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -1,43 +1,21 @@ -# Simple workflow for deploying static content to GitHub Pages -name: Deploy static content to Pages - +name: Deploy dmX to GitHub Pages on: - # Runs on pushes targeting the default branch push: - branches: ["main"] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: + branches: [main] -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: - contents: read - pages: write - id-token: write - -# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. -concurrency: - group: "pages" - cancel-in-progress: false - + contents: write jobs: - # Single deploy job since we're just deploying - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} + build-and-deploy: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Pages - uses: actions/configure-pages@v5 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 + - name: Checkout 🛎️ + uses: actions/checkout@v3 + + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@v4 with: - # Upload entire repository - path: "." - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + folder: . + clean-exclude: | + pr-preview/ + beta/