[Bug] : #5 - Edit or Delete option in announcement #41
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: CICD | |
on: | |
push: | |
branches: [main] | |
jobs: | |
deploy: | |
runs-on: self-hosted | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v3 | |
- name: Delete existing .env file | |
working-directory: server | |
run: | | |
if [ -f .env ]; then | |
rm .env | |
fi | |
- name: Update .env file | |
working-directory: server | |
run: | | |
# Overwrite the .env file with the new content from ENV_VARIABLES secret | |
echo "Overwriting .env file with new content from ENV_VARIABLES secret..." | |
echo "${{ secrets.ENV_VARIABLES }}" > .env | |
- name: Docker compose up | |
run: sudo docker compose -f ./docker/docker-compose.yml up -d --build |