Skip to content

chore(deps): update node.js to v20 (#5) #51

chore(deps): update node.js to v20 (#5)

chore(deps): update node.js to v20 (#5) #51

Workflow file for this run

name: Build and Deploy
on:
push:
tags:
- v*
branches:
- main
paths-ignore:
- '**/*.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout zh-hans.react.dev code
uses: actions/checkout@v4
with:
repository: reactjs/zh-hans.react.dev
- name: Checkout code
uses: actions/checkout@v4
with:
path: 'config'
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- run: ls -al
working-directory: config
- run: ls -al
- run: node scripts.mjs
working-directory: config
- run: ls -al
- run: cp config/Dockerfile ./
- name: Create dockerignore file.
run: |
cat > .dockerignore << EOF
Dockerfile
.dockerignore
config
node_modules
npm-debug.log
README.md
.next
.git
EOF
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:latest
platforms: all
# Create Docker Image
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push image:latest
uses: docker/build-push-action@v6
with:
push: true
context: .
platforms: linux/amd64,linux/arm64
tags: ${{ secrets.DOCKER_USER }}/zh-hans.react.dev:latest