Skip to content

[all]remove pin bucket image #5

[all]remove pin bucket image

[all]remove pin bucket image #5

Workflow file for this run

name: Deploy
on:
workflow_dispatch:
push:
branches:
- dev
- main
- beta
- test
jobs:
prod:
if: contains(github.event.head_commit.message, '[prod]') || contains(github.event.head_commit.message, '[all]')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Node v18
uses: actions/setup-node@v1
with:
node-version: v18.19.0
- uses: actions/cache@v3
with:
path: |
.yarn/cache
./node_modules
key: ${{ runner.os }}-yarn2-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn2-
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn export
env:
NEXT_PUBLIC_ENV: "prod"
- name: Deploy Gh-Pages 🚀
uses: XueMoMo/[email protected]
with:
deploy_key: ${{ secrets.DK_PROD }}
publish_dir: ./out
external_repository: decooio/cloud3-home-prod-deploy
cname: crustcloud.io
test:
if: contains(github.event.head_commit.message, '[test]') || contains(github.event.head_commit.message, '[all]')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Node v18
uses: actions/setup-node@v1
with:
node-version: v18.19.0
- uses: actions/cache@v3
with:
path: |
.yarn/cache
./node_modules
key: ${{ runner.os }}-yarn2-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn2-
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn export
env:
NEXT_PUBLIC_ENV: "test"
- name: Deploy Gh-Pages 🚀
uses: XueMoMo/[email protected]
with:
deploy_key: ${{ secrets.DK_TEST }}
publish_dir: ./out
external_repository: decooio/cloud3-home-test-deploy
cname: test.crustcloud.io
beta:
if: contains(github.event.head_commit.message, '[beta]')|| contains(github.event.head_commit.message, '[all]')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Node v18
uses: actions/setup-node@v1
with:
node-version: v18.19.0
- uses: actions/cache@v3
with:
path: |
.yarn/cache
./node_modules
key: ${{ runner.os }}-yarn2-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn2-
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn export
env:
NEXT_PUBLIC_ENV: "dev"
- name: Deploy Gh-Pages 🚀
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
cname: beta.crustcloud.io
docker:
if: contains(github.event.head_commit.message, '[docker]')|| contains(github.event.head_commit.message, '[all]')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Node v18
uses: actions/setup-node@v1
with:
node-version: v18.19.0
- uses: actions/cache@v3
with:
path: |
.yarn/cache
./node_modules
key: ${{ runner.os }}-yarn2-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn2-
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn export
env:
NEXT_PUBLIC_ENV: "prod"
- name: Build docker and publish
run: |
docker build -t crustio/cloud3-home:latest .
docker login -u ${{ secrets.DOCKER_HUB_USER_NAME }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
docker push crustio/cloud3-home:latest
- name: Update docker compose
uses: fifsky/ssh-action@master
with:
command: ${{ secrets.RUN_CMD }}
host: ${{ secrets.SSH_HOST }}
user: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}