Skip to content

Build and deploy

Build and deploy #38

name: Build and deploy
on:
push:
branches: master
tags: 'v[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
Build-and-push-container:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-tags: true
name: Set up QEMU

Check failure on line 28 in .github/workflows/build-and-deploy.yml

View workflow run for this annotation

GitHub Actions / Build and deploy

Invalid workflow file

The workflow is not valid. .github/workflows/build-and-deploy.yml (Line: 28, Col: 9): 'name' is already defined .github/workflows/build-and-deploy.yml (Line: 29, Col: 9): 'uses' is already defined
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: booterman/malla-interactiva
Build-and-deploy-gbpages:
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v4
with:
fetch-tags: true
ref: ${{ github.ref }}
- uses: actions/setup-node@v4
# Runs a single command using the runners shell
- name: Install and Build
run: |
npm install
npm run gbpages
- name: Setup Pages
uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: "."
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4