diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 0000000..48a4ff2 --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,55 @@ +name: ci + +on: + push: + branches: + - 'main' + +jobs: + + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [16.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + env: + PORT: '5000' + BACKEND_PATH: 'unsecure' + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + + docker: + + + needs: [build] + runs-on: ubuntu-latest + steps: + + - name: Set up QEMU + 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 + uses: docker/build-push-action@v2 + with: + push: true + tags: yoshiunfriendly/frontend-hideyoshi.com:latest diff --git a/Dockerfile b/Dockerfile index 7c0a116..4da2b46 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,5 +6,5 @@ COPY . . RUN npm install -EXPOSE 5000 +EXPOSE 5000-7000 ENTRYPOINT ["npm", "start"] \ No newline at end of file