From 485a1107a98f47affe6bea061b7328e29aa267ab Mon Sep 17 00:00:00 2001 From: Alex Marshall Date: Mon, 31 Jul 2023 15:54:45 +0100 Subject: [PATCH] build(github): add workflow to deploy to docs to production on push to main DOPS-54 Signed-off-by: Alex Marshall --- .github/workflows/vercel-production.yaml | 22 ++++++++++++++++++++++ .pre-commit-config.yaml | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/vercel-production.yaml diff --git a/.github/workflows/vercel-production.yaml b/.github/workflows/vercel-production.yaml new file mode 100644 index 00000000..8a86c878 --- /dev/null +++ b/.github/workflows/vercel-production.yaml @@ -0,0 +1,22 @@ +--- +name: Vercel Production Docs Deployment +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} +on: + push: + branches: + - main +jobs: + Deploy-Production: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install Vercel CLI + run: npm install --global vercel@canary + - name: Pull Vercel Environment Information + run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} + - name: Build Project Artifacts + run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} + - name: Deploy Project Artifacts to Vercel + run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a6764a93..1013f0b1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -88,7 +88,7 @@ repos: rev: v1.29.0 hooks: - id: yamllint - exclude: ".*/templates/.*" + exclude: "^(.github/workflows/*.*)$" - repo: https://github.com/IamTheFij/docker-pre-commit rev: v2.1.1 hooks: