This repository has been archived by the owner on May 21, 2024. It is now read-only.
Merge pull request #9 from LoomingEcho/develop #2
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: Continuous Deployment | |
on: | |
push: | |
branches: | |
- main # Imported restrict commits and pushes to main directly, PR only | |
jobs: | |
deploy-to-prod-stage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout dev repository | |
uses: actions/checkout@v4 | |
with: | |
ref: main | |
sparse-checkout: | | |
dist | |
- name: Checkout prod repository | |
uses: actions/checkout@v4 | |
with: | |
repository: LoomingEcho/eds-prod | |
path: eds-prod | |
ref: stage | |
- name: Remove dist from prod | |
run: rm -rf eds-prod/dist | |
- name: Copy dist from dev to prod stage | |
run: cp -r dist eds-prod/ | |
- name: Commit and push to prod repository | |
run: | | |
cd eds-prod | |
git config --global user.name "CI_COMMIT_AUTHOR" | |
git config --global user.email "[email protected]" | |
git commit -m "Deploy dist" | |
git push |