Intentando mas cosas
Some checks failed
CD for startPage / build (push) Failing after 1m19s

This commit is contained in:
2023-07-01 03:22:56 -04:00
parent 98ee4a329b
commit 8be708cd50
3 changed files with 46 additions and 20 deletions

View File

@@ -7,24 +7,38 @@ on:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: catthehacker/ubuntu:act-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Set up Docker Buildx
- name: Run build step uses: https://github.com/docker/setup-buildx-action@v2
run: ./build.sh - name: Login to Docker Hub
uses: docker/login-action@v2
deploy: with:
needs: build registry: git.skrd.fun
runs-on: ubuntu-latest username: ryuuji
password: ${{ secrets.GITEA_TOKEN }}
steps: - name: Build and push
- uses: actions/checkout@v3 uses: docker/build-push-action@v4
- name: Run build step with:
run: ./build.sh context: .
- name: Configure Server file: ./Dockerfile
run: | push: true
apt update && apt install rsync -y registry: git.skrd.fun
echo "${{ secrets.SERVER_PRIVATE_KEY }}" > private_key && chmod 600 private_key tags: ryuuji/start.danielcortes.xyz:latest
export SSH_COMMAND="ssh -o StrictHostKeyChecking=no -i private_key -p ${{ secrets.SSH_PORT || 22 }}" #
rsync -vrz -e "$SSH_COMMAND" public/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/var/www/start.skrd.fun/ #
# deploy:
# needs: build
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v3
# - name: Run build step
# run: ./build.sh
# - name: Configure Server
# run: |
# apt update && apt install rsync -y
# echo "${{ secrets.SERVER_PRIVATE_KEY }}" > private_key && chmod 600 private_key
# export SSH_COMMAND="ssh -o StrictHostKeyChecking=no -i private_key -p ${{ secrets.SSH_PORT || 22 }}"
# rsync -vrz -e "$SSH_COMMAND" public/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/var/www/start.skrd.fun/

13
Dockerfile Normal file
View File

@@ -0,0 +1,13 @@
FROM node:20 as builder
WORKDIR /build
COPY package.json package-lock.json ./
RUN npm install
COPY ./ ./
RUN ./build.sh
FROM nginx:latest
COPY --from=builder /build/public /usr/share/nginx/html

View File

@@ -1,6 +1,5 @@
#!/usr/bin/env sh #!/usr/bin/env sh
npm install
mkdir -p public mkdir -p public
npx tailwindcss -i ./src/input.css -o ./public/style.css --minify npx tailwindcss -i ./src/input.css -o ./public/style.css --minify
cp ./src/*.png public/ cp ./src/*.png public/