From 65c5e0b9842ce177c312708e94f636e4a8d157b1 Mon Sep 17 00:00:00 2001 From: Nguyen Long Nhat <27698189+torn4dom4n@users.noreply.github.com> Date: Sun, 12 Nov 2023 14:38:16 +0700 Subject: [PATCH] ci: add github actions --- .github/renovate.json | 6 +++++ .github/workflows/pages.yml | 44 +++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 .github/renovate.json create mode 100644 .github/workflows/pages.yml diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 0000000..adc0cee --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,6 @@ +{ + "extends": ["config:base"], + "dependencyDashboard": true, + "labels": ["renovate"], + "automerge": true +} diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..1928140 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,44 @@ +# To get started with Astro see: https://docs.astro.build/en/getting-started +name: Deploy Astro site to Pages + +on: + push: + branches: ['main'] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# 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 + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout your repository using git + uses: actions/checkout@v4 + + - name: Install, build, and upload your site + uses: withastro/action@v1 + with: + node-version: 20 + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2