fix(ci): update example-previews-comment matrix references #230
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.ref }}-stable-release | |
cancel-in-progress: true | |
outputs: | |
published: ${{ steps.changesets.outputs.published }} | |
steps: | |
- name: Workflow run cleanup action | |
uses: rokroskar/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.PANKOD_BOT_TOKEN }} | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: "pnpm" | |
- name: Creating .npmrc | |
run: | | |
cat << EOF > "$HOME/.npmrc" | |
//registry.npmjs.org/:_authToken=$NPM_TOKEN | |
EOF | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Install Dependencies & Build | |
run: pnpm install | |
- name: Lint | |
run: pnpm lint:ci | |
- name: Syncpack | |
run: pnpm sp lint | |
- name: Test | |
run: pnpm test:all | |
- name: Publint | |
run: pnpm publint:all | |
- name: Are The Types Wrong | |
run: pnpm attw:all | |
- name: Create Release Pull Request or Publish to npm | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
version: pnpm changeset version | |
publish: pnpm changeset publish | |
commit: "ci(changesets): version packages" | |
title: "ci(changesets): version packages" | |
env: | |
GITHUB_TOKEN: ${{ secrets.PANKOD_BOT_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
documentation-live-preview: | |
needs: publish | |
if: ${{ needs.publish.outputs.published == 'true' || contains(github.event.head_commit.message, 'deploy_preview_pls') }} | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.ref }}-next-documentation-live-preview | |
cancel-in-progress: true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: live previews docker build | |
uses: docker/build-push-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
registry: ghcr.io | |
repository: refinedev/refine/refine-live-preview | |
dockerfile: packages/live-previews/Dockerfile | |
tag_with_sha: true | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: eu-west-1 | |
- name: AWS EKS kubeconfig | |
run: | | |
aws eks --region eu-west-1 update-kubeconfig --name refine | |
- name: Deploy refine-live-previews-documentation to k8s | |
run: | | |
cd packages/live-previews | |
mv ./k8s/live-previews/Chart.yaml ./k8s/live-previews/Chart.old.yaml && | |
cat ./k8s/live-previews/Chart.old.yaml | grep -v appVersion > ./k8s/live-previews/Chart.yaml && | |
echo -e "\r\nappVersion: sha-${GITHUB_SHA::7}\r\n" >> ./k8s/live-previews/Chart.yaml && | |
cat ./k8s/live-previews/Chart.yaml | |
helm upgrade refine-next-live-previews-documentation ./k8s/live-previews --install --atomic --timeout 20m0s --values=./k8s/live-previews/values.yaml \ | |
--set replicaCount=3 \ | |
--set ingress.enabled=true \ | |
--set ingress.annotations."kubernetes\.io/ingress\.class"=nginx \ | |
--set ingress.annotations."cert-manager\.io/issuer"=letsencrypt-prod \ | |
--set ingress.hosts[0].host=${{ env.domain }} \ | |
--set ingress.hosts[0].paths[0].path="/" \ | |
--set ingress.hosts[0].paths[0].pathType=ImplementationSpecific \ | |
--set ingress.tls[0].secretName=${{ env.domain }} \ | |
--set ingress.tls[0].hosts[0]=${{ env.domain }} \ | |
env: | |
domain: "next.live-previews.refine.dev" |