Skip to content

Commit

Permalink
chore: update docs deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
bloodf committed May 18, 2022
1 parent 9b7d414 commit 6b70e63
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/docs-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@ jobs:
- name: Build and publish docker image
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: docs-storefrontcloud-io/kibocommerce:${{ steps.get_version.outputs.VERSION }}
name: docs-storefrontcloud-io/v2-kibocommerce:${{ steps.get_version.outputs.VERSION }}
registry: registry.storefrontcloud.io
username: ${{ secrets.DOCS_CLOUD_USERNAME }}
password: ${{ secrets.DOCS_CLOUD_PASSWORD }}
workdir: docs
dockerfile: ../.vuestorefrontcloud/docker/docs/Dockerfile
workdir: .
dockerfile: ./.vuestorefrontcloud/docker/docs/Dockerfile
buildoptions: "--compress"

deploy:
if: contains(github.event.pull_request.labels.*.name, 'release') && contains('bloodf|alefbarbeli|domideimel|LiorLindvor|filrak|filipsobol|andrzejewsky|', github.actor)
runs-on: ubuntu-latest
needs: build
steps:
Expand All @@ -47,7 +46,7 @@ jobs:
id: deployment
with:
token: "${{ github.token }}"
target_url: https://docs.europe-west1.gcp.storefrontcloud.io/v2
target_url: https://docs.europe-west1.gcp.storefrontcloud.io/kibocommerce
environment: production
initial_status: in_progress
- name: Deploy on docs.europe-west1.gcp.storefrontcloud.io/kibocommerce
Expand All @@ -63,7 +62,7 @@ jobs:
uses: chrnorm/deployment-status@releases/v1
with:
token: "${{ github.token }}"
target_url: https://docs.europe-west1.gcp.storefrontcloud.io/v2
target_url: https://docs.europe-west1.gcp.storefrontcloud.io/kibocommerce
state: "success"
description: Congratulations! The deploy is done.
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
Expand All @@ -72,7 +71,7 @@ jobs:
uses: chrnorm/deployment-status@releases/v1
with:
token: "${{ github.token }}"
target_url: https://docs.europe-west1.gcp.storefrontcloud.io/v2
target_url: https://docs.europe-west1.gcp.storefrontcloud.io/kibocommerce
description: Unfortunately, the instance hasn't been updated.
state: "failure"
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
9 changes: 7 additions & 2 deletions .vuestorefrontcloud/docker/docs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@ WORKDIR /var/www

COPY . .

RUN npm install \
RUN yarn install --network-concurrency 1
RUN cd packages/api-client && yarn build && yarn cache clean --all
RUN cd packages/composables && yarn build && yarn cache clean --all

RUN cd docs \
&& npm install \
&& sed -i "s/base: '\/',/base: '\/kibocommerce\/',/g" ./.vuepress/config.js \
&& cat ./.vuepress/config.js \
&& npm run build

FROM nginx

COPY --from=build /var/www/.vuepress/dist /usr/share/nginx/html/kibocommerce
COPY --from=build /var/www/docs/.vuepress/dist /usr/share/nginx/html/kibocommerce
4 changes: 2 additions & 2 deletions .vuestorefrontcloud/docker/docs/build-docker.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
TAG=`git rev-parse HEAD`
docker build --progress plain -t registry.storefrontcloud.io/docs-storefrontcloud-io/kibocommerce:${TAG:0:8} -f Dockerfile ../../../docs
# docker push registry.storefrontcloud.io/docs-storefrontcloud-io/kibocommerce:${TAG:0:8}
docker build --progress plain -t registry.storefrontcloud.io/docs-storefrontcloud-io/v2-kibocommerce:${TAG:0:8} -f Dockerfile ../../../
# docker push registry.storefrontcloud.io/docs-storefrontcloud-io/v2-kibocommerce:${TAG:0:8}

0 comments on commit 6b70e63

Please sign in to comment.