chore: release v0.0.6 #33
Workflow file for this run
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: Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Checkout code | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# Step 2: Install pnpm and Node.js | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
# Step 4: Install dependencies | |
- name: Install dependencies | |
run: pnpm install | |
# Step 5: Build the project | |
- name: Build the project | |
run: pnpm build | |
# Step 6: Deploy with NuxtHub | |
- name: Deploy to NuxtHub | |
run: npx nuxthub deploy --no-build | |
env: | |
NUXT_HUB_PROJECT_KEY: ${{ secrets.NUXT_HUB_PROJECT_KEY }} | |
NUXT_HUB_USER_TOKEN: ${{ secrets.NUXT_HUB_USER_TOKEN }} | |
# Step 7: Docker login and image build/tag/push | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and tag Docker image | |
run: | | |
TAG_NAME=$(echo $GITHUB_REF | sed 's/refs\/tags\///') | |
docker build . -t ${{ secrets.DOCKER_USERNAME }}/introxd:latest | |
docker tag ${{ secrets.DOCKER_USERNAME }}/introxd:latest ${{ secrets.DOCKER_USERNAME }}/introxd:$TAG_NAME | |
- name: Push Docker image to Docker Hub | |
run: | | |
TAG_NAME=$(echo $GITHUB_REF | sed 's/refs\/tags\///') | |
docker push ${{ secrets.DOCKER_USERNAME }}/introxd:latest | |
docker push ${{ secrets.DOCKER_USERNAME }}/introxd:$TAG_NAME |