Created deploy pipeline
All checks were successful
Production Build and Deploy / Build (push) Successful in 1m14s
Production Build and Deploy / Deploy (push) Successful in 22s

This commit is contained in:
Liviu Burcusel 2025-12-15 13:11:27 +01:00
parent 30a89d6662
commit 7b34c27290
Signed by: liviu
GPG key ID: 6CDB37A4AD2C610C
3 changed files with 16 additions and 7 deletions

View file

@ -55,9 +55,9 @@ jobs:
needs: build needs: build
runs-on: docker runs-on: docker
steps: steps:
- name: Setup Node environment - name: Setup environment
run: | run: |
apk add --update nodejs npm apk --no-cache add --update nodejs npm curl
- name: Code checkout - name: Code checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
@ -101,7 +101,15 @@ jobs:
docker image tag ${{ env.CONTAINER_NAME }}:latest ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.CONTAINER_NAME }}:${{ steps.prepare-env.outputs.VERSION }} docker image tag ${{ env.CONTAINER_NAME }}:latest ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.CONTAINER_NAME }}:${{ steps.prepare-env.outputs.VERSION }}
docker image push ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.CONTAINER_NAME }}:${{ steps.prepare-env.outputs.VERSION }} docker image push ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.CONTAINER_NAME }}:${{ steps.prepare-env.outputs.VERSION }}
- name: Server deploy - name: Server deploy
run: | uses: https://git.burcusel.nl/public/ssh-action@v1.2.6
echo "Deploy to server not implemented yet." with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }}
script: |
cd /opt/glowing-fiesta
docker compose down
docker compose pull
docker compose up -d
#### ####

View file

@ -5,5 +5,6 @@ const currentYear = new Date().getFullYear();
<footer class="layout-footer font-bold"> <footer class="layout-footer font-bold">
<div v-if="currentYear === 2025">Glowing Fiesta 2025</div> <div v-if="currentYear === 2025">Glowing Fiesta 2025</div>
<div v-else>Glowing Fiesta 2025 - {{ currentYear }}</div> <div v-else>Glowing Fiesta 2025 - {{ currentYear }}</div>
<div class="font-light text-emerald-500">(with auto-deploy)</div>
</footer> </footer>
</template> </template>

View file

@ -32,7 +32,7 @@ describe("Footer.vue", () => {
mockDate(2025); mockDate(2025);
const wrapper = mount(Footer); const wrapper = mount(Footer);
expect(wrapper.text()).toBe("Glowing Fiesta 2025"); expect(wrapper.text()).toBe("Glowing Fiesta 2025(with auto-deploy)");
expect(wrapper.text()).not.toContain(" - "); expect(wrapper.text()).not.toContain(" - ");
}); });
@ -40,7 +40,7 @@ describe("Footer.vue", () => {
mockDate(2034); mockDate(2034);
const wrapper = mount(Footer); const wrapper = mount(Footer);
expect(wrapper.text()).toBe("Glowing Fiesta 2025 - 2034"); expect(wrapper.text()).toBe("Glowing Fiesta 2025 - 2034(with auto-deploy)");
}); });
it("has proper structure / content", () => { it("has proper structure / content", () => {
@ -49,6 +49,6 @@ describe("Footer.vue", () => {
expect(footer.exists()).toBe(true); expect(footer.exists()).toBe(true);
expect(footer.element.tagName).toBe("FOOTER"); expect(footer.element.tagName).toBe("FOOTER");
expect(wrapper.findAll("div")).toHaveLength(1); expect(wrapper.findAll("div")).toHaveLength(2);
}); });
}); });