-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6638d2b
commit decf2da
Showing
1 changed file
with
79 additions
and
29 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,34 +1,84 @@ | ||
name: Deploy to Production | ||
# name: Maven CI/CD | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
# on: | ||
# push: | ||
# branches: [master] | ||
# tags: [v*] | ||
# workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
# jobs: | ||
# build_and_publish: | ||
# runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - name: Set up JDK 11 | ||
# uses: actions/setup-java@v2 | ||
# with: | ||
# java-version: "11" | ||
# distribution: "temurin" | ||
# cache: maven | ||
# - name: Install test dependencies | ||
# run: sudo apt-get update && sudo apt-get -y -q --no-install-recommends install ffmpeg mediainfo tesseract-ocr tesseract-ocr-deu | ||
# - name: Build with Maven | ||
# run: mvn --batch-mode -Pprod clean install | ||
# - name: Upload war artifact | ||
# uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: docs-web-ci.war | ||
# path: docs-web/target/docs*.war | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
# build_docker_image: | ||
# name: Publish to Docker Hub | ||
# runs-on: ubuntu-latest | ||
# needs: [build_and_publish] | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build project | ||
run: npm run build | ||
|
||
- name: Deploy to server | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.SERVER_HOST }} | ||
username: ${{ secrets.SERVER_USER }} | ||
key: ${{ secrets.SERVER_SSH_KEY }} | ||
source: "dist/*" | ||
target: "/path/to/your/project" | ||
# steps: | ||
# - | ||
# name: Checkout | ||
# uses: actions/checkout@v2 | ||
# - | ||
# name: Download war artifact | ||
# uses: actions/download-artifact@v2 | ||
# with: | ||
# name: docs-web-ci.war | ||
# path: docs-web/target | ||
# - | ||
# name: Setup up Docker Buildx | ||
# uses: docker/setup-buildx-action@v1 | ||
# - | ||
# name: Login to DockerHub | ||
# if: github.event_name != 'pull_request' | ||
# uses: docker/login-action@v1 | ||
# with: | ||
# username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
# password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
# - | ||
# name: Populate Docker metadata | ||
# id: metadata | ||
# uses: docker/metadata-action@v3 | ||
# with: | ||
# images: mandyyymeng/gitteedy | ||
# flavor: | | ||
# latest=false | ||
# tags: | | ||
# type=ref,event=tag | ||
# type=raw,value=latest,enable=${{ github.ref_type != 'tag' }} | ||
# labels: | | ||
# org.opencontainers.image.title = Teedy | ||
# org.opencontainers.image.description = Teedy is an open source, lightweight document management system for individuals and businesses. | ||
# org.opencontainers.image.created = ${{ github.event_created_at }} | ||
# org.opencontainers.image.author = Sismics | ||
# org.opencontainers.image.url = https://teedy.io/ | ||
# org.opencontainers.image.vendor = Sismics | ||
# org.opencontainers.image.license = GPLv2 | ||
# org.opencontainers.image.version = ${{ github.event_head_commit.id }} | ||
# - | ||
# name: Build and push | ||
# id: docker_build | ||
# uses: docker/build-push-action@v2 | ||
# with: | ||
# context: . | ||
# push: ${{ github.event_name != 'pull_request' }} | ||
# tags: ${{ steps.metadata.outputs.tags }} | ||
# labels: ${{ steps.metadata.outputs.labels }} |