invalidate css cache automatically on deploy
Gitea/resume/pipeline/head This commit looks good Details

This commit is contained in:
andrzej 2024-11-13 13:06:30 +01:00
parent 79965b392e
commit 76fdea43cf
3 changed files with 10 additions and 2 deletions

5
Jenkinsfile vendored
View File

@ -2,6 +2,11 @@ pipeline {
agent any
stages {
stage('build'){
steps{
sh './build.sh'
}
}
stage('deploy'){
steps{
sshPublisher(publishers: [sshPublisherDesc(configName: 'Demos', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: 'ssh-uploads/resume', remoteDirectorySDF: false, removePrefix: '', sourceFiles: '**')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])

3
build.sh Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
COMMIT="$(git rev-parse HEAD)"
sed -i "s/css?=\w*/css?=${COMMIT}/g" index.html

View File

@ -6,8 +6,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Andrzej Stepien : Coder for Hire</title>
<link rel="stylesheet" href="css/defaults.css?v=3" />
<link rel="stylesheet" href="css/styles.css?v=3" />
<link rel="stylesheet" href="css/defaults.css?=79965b392eb4247ada3eaed20a8d12e6f8c34337" />
<link rel="stylesheet" href="css/styles.css?=79965b392eb4247ada3eaed20a8d12e6f8c34337" />
<!-- Twitter card meta -->
<meta name="twitter:card" content="summary_large_image" />