feat: index page, publish ci

This commit is contained in:
Andrejus
2021-05-02 23:00:42 +01:00
parent 9a5b931407
commit 9c5f243cdd
5 changed files with 72 additions and 17 deletions

View File

@@ -1,14 +1,17 @@
name: Dotfiles publisher
on:
push:
branches:
- master
on: [push]
# on:
# push:
# branches:
# - master
jobs:
publish-installer:
name: Publish install script
name: Publish setup script
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Publish to CDN
- env:
APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
name: Publish to CDN
run: ./scripts/publish.sh

View File

@@ -1,6 +1,6 @@
# dots.andrejus.dev
Collection of experimental dotfiles and supporting install scripts.
Collection of my dotfiles and supporting install scripts
## Install
@@ -8,21 +8,24 @@ Collection of experimental dotfiles and supporting install scripts.
## Stack
### Shell
🐟 fish (+ fisher)
Tested and maintained against Debian buster
### Editor
neovim (+ vim-plug)
### Shells
- 🐟 fish (+ fisher)
### Editors
- neovim (+ vim-plug)
- emacs
### Languages
- js (nvm, node, yarn)
- node.js (nvm, yarn)
- python (pyenv, poetry)
- java
### Tools
- docker (+ docker-compose)
- docker
- terraform
- gcloud, firebase, awscli
- screenfetch

View File

@@ -40,8 +40,13 @@ export PATH="$POETRY_ROOT/bin:$PATH"
export NVM_DIR=${NVM_DIR:-"$HOME/.nvm"}
mkdir -p "$NVM_DIR"
export PATH="$NVM_DIR/bin:$PATH"
VERSION=`cat $NVM_DIR/alias/lts/fermium` # Default v14
# node (default v14)
node_alias="$NVM_DIR/alias/lts/fermium"
if [ -f "$node_alias" ]; then
VERSION=`cat $node_alias`
export PATH="$NVM_DIR/versions/node/$VERSION/bin:$PATH"
fi
# yarn
export YARN_DIR=${YARN_DIR:-"$HOME/.yarn"}

View File

@@ -14,6 +14,10 @@ resource "google_storage_bucket" "bucket" {
depends_on = [google_project_service.storage]
location = var.gcs_location
website {
main_page_suffix = "index.html"
not_found_page = "index.html"
}
}
resource "google_storage_default_object_access_control" "bucket_public" {
@@ -22,6 +26,22 @@ resource "google_storage_default_object_access_control" "bucket_public" {
entity = "allUsers"
}
resource "google_storage_bucket_object" "index" {
name = "index.html"
source = "${path.module}/public/index.html"
bucket = google_storage_bucket.bucket.name
}
resource "google_service_account" "uploader_sa" {
account_id = "${var.prefix}-uploader-sa"
display_name = "Uploader Service Account"
}
resource "google_storage_default_object_access_control" "upload" {
bucket = google_storage_bucket.bucket.name
role = "OWNER"
entity = "user-${google_service_account.uploader_sa.email}"
}
# =================================================================
# Expose bucket via HTTPS using Cloud CDN

View File

@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>andrejus.dev</title>
<meta charset="utf-8" />
<meta name="referrer" content="no-referrer" />
<meta
name="viewport"
content="width=device-width,minimum-scale=1,initial-scale=1"
/>
<link rel="canonical" href="https://andrejus.dev/" />
<meta
http-equiv="refresh"
content="0; url=https://github.com/andrejusk/dotfiles"
/>
</head>
<body>
<div>
<p>Redirecting to GitHub repo...</p>
</div>
</body>
</html>