fix(store): update Dockerfile to copy static assets #379
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: store Release | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- "examples/store/**" | |
- ".github/workflows/store-deploy.yml" | |
jobs: | |
store-deploy: | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.ref }}-store-deploy | |
cancel-in-progress: true | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: client docker build | |
uses: docker/build-push-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
registry: ghcr.io | |
repository: refinedev/refine/refine-store | |
tag_with_sha: true | |
dockerfile: examples/store/Dockerfile | |
- 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: Get nodes | |
run: kubectl get nodes | |
- name: Deploy refine-store to k8s | |
run: | | |
cd examples/store | |
mv ./k8s/refine-store/Chart.yaml ./k8s/refine-store/Chart.old.yaml && | |
cat ./k8s/refine-store/Chart.old.yaml | grep -v appVersion > ./k8s/refine-store/Chart.yaml && | |
echo -e "\r\nappVersion: sha-${GITHUB_SHA::7}\r\n" >> ./k8s/refine-store/Chart.yaml && | |
cat ./k8s/refine-store/Chart.yaml | |
helm upgrade refine-store ./k8s/refine-store --install --atomic --values=./k8s/refine-store/values.yaml \ | |
--set NEXT_PUBLIC_STRIPE_KEY=${{ secrets.NEXT_PUBLIC_STRIPE_KEY }} \ |