-
Notifications
You must be signed in to change notification settings - Fork 672
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: correct Docker configuration (#1646)
- Loading branch information
Showing
6 changed files
with
62 additions
and
15 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,42 @@ | ||
name: Deploy | ||
name: deploy | ||
|
||
on: push | ||
|
||
jobs: | ||
website: | ||
if: "startsWith(github.event.commits[0].message, 'release')" | ||
runs-on: ubuntu-latest | ||
environment: prod | ||
steps: | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.15.0 | ||
|
||
- name: checkout | ||
uses: actions/checkout@master | ||
uses: actions/checkout@v4 | ||
|
||
- uses: borales/[email protected] | ||
with: | ||
cmd: install | ||
|
||
- name: build | ||
# Copy dockerfile.docs & _nginx just only for ng-alain.com | ||
run: | | ||
yarn run site:build | ||
cp ./src/dist/browser/index.html ./src/dist/browser/404.html | ||
cp ./Dockerfile.docs ./src/dist/browser/Dockerfile.docs | ||
cp -r ./_nginx/ ./src/dist/browser/_nginx | ||
- name: deploy-to-gh-pages | ||
uses: peaceiris/actions-gh-pages@v2 | ||
env: | ||
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }} | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PUBLISH_BRANCH: gh-pages | ||
PUBLISH_DIR: ./src/dist/browser | ||
uses: peaceiris/actions-gh-pages@v3 | ||
# env: | ||
# # PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }} | ||
# # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# PUBLISH_BRANCH: gh-pages | ||
# PUBLISH_DIR: ./src/dist/browser | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_branch: gh-pages | ||
publish_dir: ./src/dist/browser | ||
emptyCommits: false | ||
|
||
- name: deploy-to-surge | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: docker-build-doc-site | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
website: | ||
if: "startsWith(github.event.commits[0].message, 'release')" | ||
runs-on: ubuntu-latest | ||
environment: prod | ||
steps: | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.15.0 | ||
|
||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login Docker | ||
uses: docker/login-action@v2 | ||
with: | ||
# registry: registry.gitlab.com | ||
# username: ${{ secrets.GITLAB_USERNAME }} | ||
# password: ${{ secrets.GITLAB_PASSWORD }} | ||
# Docker Hub | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: ./Dockerfile.docs | ||
push: true | ||
tags: | ||
cipchk/ng-alain-docs:latest | ||
# registry.gitlab.com/ng-alain/images:docs |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ jobs: | |
if: "!startsWith(github.event.commits[0].message, 'release')" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/checkout@v4 | ||
- uses: pixta-dev/repository-mirroring-action@v1 | ||
with: | ||
target_repo_url: [email protected]:ng-alain/delon.git | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,13 +8,10 @@ | |
# EXPOSE 80 | ||
# CMD [ "node", "server/main.js" ] | ||
|
||
|
||
FROM node:lts as dist | ||
MAINTAINER authors="cipchk <[email protected]>" | ||
WORKDIR /dist | ||
RUN git clone --depth 1 --branch gh-pages https://github.com/ng-alain/delon.git . \ | ||
&& sed -i 's/\/delon\//\//g' /dist/index.html \ | ||
&& sed -i 's/\/delon\//\//g' /dist/404.html | ||
RUN git clone --depth 1 --branch gh-pages https://github.com/ng-alain/delon.git . | ||
COPY _nginx _nginx | ||
|
||
FROM nginx:stable-alpine | ||
|
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