From c78a07243fb7dc99051e23de1939949e3c077d60 Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Sat, 2 Mar 2024 09:10:37 -0500 Subject: [PATCH 1/2] chore: added dependabot --- .github/dependabot.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..d15c975 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + groups: + actions: + patterns: + - "*" From 305ac0c16a6d1079395ab11d430c10ea348dd517 Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Sat, 2 Mar 2024 09:33:22 -0500 Subject: [PATCH 2/2] ci: consolidate and update workflows --- .github/workflows/test-build.yml | 44 ---------------- .github/workflows/{deploy.yml => website.yml} | 50 +++++++++++-------- 2 files changed, 28 insertions(+), 66 deletions(-) delete mode 100644 .github/workflows/test-build.yml rename .github/workflows/{deploy.yml => website.yml} (57%) diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml deleted file mode 100644 index 6c6ff82..0000000 --- a/.github/workflows/test-build.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Test website build - -on: - pull_request: - branches: - - main - workflow_dispatch: - -defaults: - run: - shell: bash - -jobs: - deploy: - name: Test deploy to GitHub Pages - runs-on: ubuntu-latest - steps: - - name: Checkout website branch - uses: actions/checkout@v3 - with: - ref: website - - name: Checkout main branch - uses: actions/checkout@v3 - with: - ref: main - path: ./code/ - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: '3.9' - cache: 'pip' - - name: Install Python requirements - run: pip install -r requirements.txt - - name: Generate documentation - run: python3 ./docs/documentation/produce_doc.py ./code/cytools/ - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: npm - - name: Install dependencies - run: npm ci - - name: Build website - run: npm run build diff --git a/.github/workflows/deploy.yml b/.github/workflows/website.yml similarity index 57% rename from .github/workflows/deploy.yml rename to .github/workflows/website.yml index 06b9be6..7684b76 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/website.yml @@ -1,52 +1,46 @@ -name: Deploy to GitHub Pages +name: GitHub Pages on: push: branches: - main - website + pull_request: + branches: + - main + - website workflow_dispatch: -permissions: - contents: read - pages: write - id-token: write - concurrency: - group: "pages" + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -defaults: - run: - shell: bash - jobs: - deploy: - name: Deploy to GitHub Pages + build: runs-on: ubuntu-latest steps: - name: Checkout website branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: website - name: Checkout main branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: main path: ./code/ - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.11' cache: 'pip' - name: Install Python requirements run: pip install -r requirements.txt - name: Generate documentation run: python3 ./docs/documentation/produce_doc.py ./code/cytools/ - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 cache: npm - name: Install dependencies run: npm ci @@ -54,11 +48,23 @@ jobs: run: npm run build - name: Setup Pages id: pages - uses: actions/configure-pages@v2 + uses: actions/configure-pages@v4 - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v3 with: path: ./build + + deploy: + if: github.event_name == 'push' + needs: build + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v1 + uses: actions/deploy-pages@v4