mirror of
https://github.com/ProjectSegfault/website.git
synced 2024-11-23 00:22:59 +05:30
commit
96841f3577
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@ -0,0 +1 @@
|
||||
node_modules
|
29
.github/workflows/docker.yml
vendored
Normal file
29
.github/workflows/docker.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
name: Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
-
|
||||
name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
-
|
||||
name: Build and push
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
push: true
|
||||
tags: projectsegfault/website:latest
|
@ -1,44 +0,0 @@
|
||||
pipeline:
|
||||
build:
|
||||
when:
|
||||
event: [push, pull_request]
|
||||
image: node:current-bullseye-slim
|
||||
commands:
|
||||
- npm install
|
||||
- npm run build
|
||||
- pwd
|
||||
- mv build/ ../
|
||||
- rm -rf *
|
||||
- mv ../build/* .
|
||||
push:
|
||||
when:
|
||||
event: [push]
|
||||
image: appleboy/drone-git-push
|
||||
settings:
|
||||
branch: build
|
||||
remote: git@github.com:ProjectSegfault/website.git
|
||||
force: true
|
||||
commit: true
|
||||
commit_message: Successfully built the page.
|
||||
ssh_key:
|
||||
from_secret: ssh_key_git
|
||||
update:
|
||||
when:
|
||||
event: [push]
|
||||
image: appleboy/drone-ssh
|
||||
settings:
|
||||
host:
|
||||
- projectsegfau.lt
|
||||
username: gitea
|
||||
key:
|
||||
from_secret: ssh_key
|
||||
port: 6665
|
||||
command_timeout: 1m
|
||||
script:
|
||||
- cd /var/www/
|
||||
- rm -rf html
|
||||
- git clone -b build https://github.com/ProjectSegfault/website.git html
|
||||
- cd html
|
||||
# I HATE GIT AND HOW THEY FORCE THIS
|
||||
# todo: do the funny pull but find a way to accept the changes.
|
||||
branches: main
|
12
Dockerfile
Normal file
12
Dockerfile
Normal file
@ -0,0 +1,12 @@
|
||||
FROM node:16 AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json ./
|
||||
RUN npm install
|
||||
COPY . ./
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:1.23-alpine
|
||||
COPY --from=build /app/build /usr/share/nginx/html
|
||||
EXPOSE 80
|
Loading…
Reference in New Issue
Block a user